{include file="public/user_head" /}
<body>
<div class="page-body">
    {include file="public/user_dh" /}
    <form class="form-horizontal">
    <div class="personal-info-item">
        <span id="ctl00_body_Label1" class="personal-info-line personal-info-label">积分</span>
        <label class="personal-info-line-split">:</label>
        <span id="ctl00_body_Textbox1" class="friend-new-line friend-new-line-input" placeholder="">4.03</span>
    </div>
    <div class="personal-info-item">
        <span id="ctl00_body_Label1" class="personal-info-line personal-info-label">余额</span>
        <label class="personal-info-line-split">:</label>
        <span id="ctl00_body_Textbox1" class="friend-new-line friend-new-line-input" placeholder="">10293.00</span>
    </div>
    <div class="personal-info-item">
        <span id="ctl00_body_Label1" class="personal-info-line personal-info-label">复投金额</span>
        <label class="personal-info-line-split">:</label>
        <input name="ctl00$body$Textbox2" type="text" id="x1" class="friend-new-line friend-new-line-input" placeholder="手续费0%" />
    </div>
    <input type="submit" name="ctl00$body$Sub" id = "go" value="确认提交" id="ctl00_body_Sub" class="friend-new-sub" />
</form>

    <script src="/static/wap/ui/layer/extend/layer.ext.js"></script>
    <script>
        mgo(44);

        $("#go").click(function () {
            zhuanjihuobi_go();
            return false;
        });
        function zhuanjihuobi_go(){
            if($("#x1").val()==""){
                tishi4("请输入要转换积分的数量",'#x1');
                return false;
            }

            if(!checkNum($("#x1").val())  ||　$("#x1").val()<50){
                tishi4("转换积分至少50起,请输入50以上的整数",'#x1');
                return false;
            }

            if(parseFloat($("#x1").val())>parseFloat($("#mejihuobi").text())){
                tishi4("您的积分不足",'#x1');
                return false;
            }

            var lcindex_ = layer.prompt({title: '请输入安全密码，并确认转换',formType: 1}, function(pass){
                if(pass==""){
                    layer.msg("请输入您的密码")
                    return false;
                }
                tishi2();
                $.get("/mobile/bin.php?act=point1_to_flower&num="+$("#x1").val()+"&pwdII="+pass,function(e){
                    tishi2close();
                    layer.close(lcindex_);
                    if(e!=""){
                        //$("#x4-cos").html(unescape(e));

                        if(!isNaN(unescape(e))){
                            layer.msg("转换成功,2秒后返回",{time: 2000, btn: ['确定'],end:function(){
                                    $('#mejihuobi').empty().html(unescape(e));
                                    location.reload();
                                }});
                        }else{
                            layer.alert(unescape(e));
                        }
                    }
                },'html');
            });
        }

        function isNumberBy100(ssn) {
            var re = /^[0-9]*[0-9]$/i;       //校验是否为数字
            if(re.test(ssn) && ssn%100===0) {
                return true;
            }else {
                return false;
            }
        }
    </script>


    <script type="text/javascript">
        $(".head-icon-left").on("click", function () {
            window.history.go(-1);
        });
    </script>
</div>
{include file="public/footer" /}
</body>
</html>